package net.qhzw.vip.qiyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.qhzw.vip.qiyu.entity.SysMenu;

import java.util.List;

public interface SysMenuMapper extends BaseMapper<SysMenu> {


    List<SysMenu> selectMenusByUserId(Long userId);


    /***
     * 查询根节点count
     * @param id
     * @return
     */
    int findChildCount(Long id);


    /***
     * 根据userId获取权限数据
     * @param userId
     * @return
     */
    List<String> getPermissionByUserId(Long userId);


    /***
     * 所有权限
     * @return
     */
    List<String> getPermissionsAll();


    /***
     * 角色Id查询菜单
     * @param roleId
     * @return
     */
    List<SysMenu> findListByShopId(Long roleId);
}